Object Oriented Programming - Interview Questions and Answers for 'Stateless objects' | Search Interview Question - javasearch.buggybread.com
Javasearch.buggybread.com

Search Interview Questions


 More than 3000 questions in repository.
 There are more than 900 unanswered questions.
Click here and help us by providing the answer.
 Have a video suggestion.
Click Correct / Improve and please let us know.
Label / Company      Label / Company / Text

   



Object Oriented Programming - Interview Questions and Answers for 'Stateless objects' - 2 question(s) found - Order By Newest

 Q1. What are stateless objects ? How are they different from immutable objects ? Which of these two is thread safe ?Object Oriented Programming
Ans. Stateless objects are the objects without instance fields (instance variables). The class may have compile time constants i.e static final fields.Immutable objects are the objects which have state but the state cannot be changed after initialization. Both are Thread safe.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java   stateless objects   immutable  immutability objects   objects   singleton scope


Related Questions

  Why do we need Inner classes ? Cant we just work with outer classes wherever we implement Inner classes ?
 Let's suppose we have an to destroy objects, Design a program to implement garbage collection ?
  How can we create objects if we make the constructor private ?
  Difference Between this() and super() ?
  Please specify in what sequence the objects of following classes will be created ?

Session , SessionFactory, Query , Configuration
  Which interface provides the capability to store objects using a key-value pair?
  What is an Object ?
  How many SessionFactory and Session objects are created ?
  Can we declare Entity class as final ?


 Q2. What are advantages of stateless and / or immutable objects ?Object Oriented Programming
Ans. They can be shared across multiple threads as they are thread safe.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java   stateless objects   immutable  immutability objects   objects


Related Questions

  What are stateless objects ? How are they different from immutable objects ? Which of these two is thread safe ?
 What are the benefits of creating immutable objects ?
 What are the examples of immutable objects in Java ?
 What are the drawbacks of creating immutable objects ? Why don't we create all object immutable if mutability possesses so much threat ?
 Does immutability facilitates better performance ?
 What is immutability and What are it's disadvantages ?



Help us and Others Improve. Please let us know the questions asked in any of your previous interview.

Any input from you will be highly appreciated and It will unlock the application for 10 more requests.

Company Name:
Questions Asked: